<?php

class Adept_Db_Query_Conditional extends Adept_Db_Query_Abstract 
{
    
    protected $where = array();    

    public function where($cond, $logic = 'AND') 
    {
        if (count($this->where) > 0) {
            $this->where[] = "{$logic} {$cond}";
        } else {
            $this->where[] = $cond;
        }
        return $this;
    }
    
    public function orWhere($cond) 
    {
        return $this->where($cond, 'OR');
    }
    
}